package com.fenghongzhang.day003_mvp.mvp.view;

import android.os.Bundle;
import android.widget.Button;
import android.widget.Toast;

import androidx.appcompat.app.AppCompatActivity;

import com.fenghongzhang.day003_mvp.R;
import com.fenghongzhang.day003_mvp.UserModule;
import com.fenghongzhang.day003_mvp.entity.Food;
import com.fenghongzhang.day003_mvp.entity.User;

import javax.inject.Inject;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class Main2Activity extends AppCompatActivity {



    private Food food;

    @Inject
    User user;

    @BindView(R.id.btn)
    Button btn;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);
        ButterKnife.bind(this);



//        DaggerUserComon.builder().build().inject(this);

//        DaggerUserComon.builder().userModule(new UserModule("haha")).build().inject(this);

//        user.setName("哈哈");
        Toast.makeText(this, user.getName(), Toast.LENGTH_SHORT).show();

    }

    @OnClick(R.id.btn)
    public void onViewClicked() {
        Toast.makeText(this, "呵呵", Toast.LENGTH_SHORT).show();
    }
}
